OPC-UA Embedded Server SDK  2.1.0
Diagnostic and Test Functions

Functions

int64_t UAServer_Get_datetime (void)
 
void UAServer_Time_emulation_enabled (bool_t enable)
 
void UAServer_Callback_log (UA_Log_severity_t severity, int64_t timestamp, const char *file_name, uint32_t line_number, UA_Log_payload_t payload_type, const void *payload, uint32_t payload_length)
 
void UAServer_Printf (int64_t timestamp, const char *format,...)
 
UA_Status_t UAServer_memory_info (uint32_t *total_memory_provided, uint32_t *memory_unusable, uint32_t *max_memory_used_this_run, uint32_t *total_memory_recommended)
 

Detailed Description

Function Documentation

int64_t UAServer_Get_datetime ( void  )

Function provided by library to enable host to obtain current date and time

Where the library is using time emulation the callback function for DateTime is not used. THis function allows the host to obtain the date and time in use by the library in order to print accurate log messages as an aid to debugging.

Returns
Current date and time.
void UAServer_Time_emulation_enabled ( bool_t  enable)

Enable time emulation mode

Call this function if the default (disabled) is unsuitable. When enabled, time emulation sets the server date & time from incoming client request packets in order to allow the server to operate with no date and time infrastructure implemented on the host system. In this case, UAServer_Callback_datetime is not called. Time emulation is for testing only and is not standard compliant.

Parameters
[in]enableEnable or disable time emulation mode
void UAServer_Callback_log ( UA_Log_severity_t  severity,
int64_t  timestamp,
const char *  file_name,
uint32_t  line_number,
UA_Log_payload_t  payload_type,
const void *  payload,
uint32_t  payload_length 
)

A log message from the server stack

Supports debugging of a server implementation.

Parameters
[in]severityThe severity of the log event
[in]timestampThe timestamp of the event
[in]file_nameThe source filename of the file generating the event
[in]line_numberThe source line number of the file generating the event
[in]payload_typeThe type of the payload accompanying the log event
[in]payloadA pointer to payload related to the log event
[in]payload_lengthThe length of the payload related to the log event
void UAServer_Printf ( int64_t  timestamp,
const char *  format,
  ... 
)

A printf message from the server stack

Supports debugging of a server implementation.

Parameters
[in]timestampThe timestamp of the message
[in]formatMessage format string
[in]...Variable argument list
UA_Status_t UAServer_memory_info ( uint32_t *  total_memory_provided,
uint32_t *  memory_unusable,
uint32_t *  max_memory_used_this_run,
uint32_t *  total_memory_recommended 
)

Get information about the memory utilisation

Parameters
[out]total_memory_providedThe total memory provided to the SDK.
[out]memory_unusableThe memory that is unusable due to the characteristics of the allocator. Modifying the amount of memory provided by this amount results in optimum efficiency.
[out]max_memory_used_this_runThe maximum memory used since the server was started.
[out]total_memory_recommendedThe total memory recommended. This assumes that the server has been stressed to the maximum degree likely to be encountered in the field. The max_memory_used_this_run is multiplied by a 1.5 safety margin. total_memory_recommended is calculated based on the maximum amount of memory used by the server since initialisation. If the server memory utilisation has not been exercised to the maximum then the recommended figure is meaningless. Operating the server with less than total_memory_recommended bytes can result in failure over time due to exhaustion of the memory subsystem.
Returns
The result of the operation. The output arguments are only valid if the return value == OpcUa_Good.